package com.shangxia.feign.client;

import com.shangxia.feign.client.fallBack.OrderClientFallBackFactory;
import com.shangxia.feign.model.SX_Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author zhouya24
 * @date 2021/11/18 15:26
 * @apiNote OrderClient
 */

@FeignClient(value = "orderservice", fallbackFactory = OrderClientFallBackFactory.class)
@RequestMapping("/order")
public interface OrderClient {
    @GetMapping("/{id}")
    SX_Order queryById(@PathVariable("id") Long id);
}
